from fastapi import APIRouter, UploadFile, File
from ..services.file_service import FileService

router = APIRouter()

@router.post("/api/upload")
async def upload_image(file: UploadFile = File(...)):
    """
    处理图片上传的端点
    """
    await FileService.save_upload_file(file)

    return {
        'code': "self.code",
        'message': "self.message",
        'data': "self.data",
        'timestamp': "self.timestamp",
    }